#include <QtCore/QTextStream>
#include <QtCore/QFile>
#include <ctime>

#include <gflags/gflags.h>

DEFINE_int32(lines, 100, "total lines");

int main(int argc,char* argv[]){
  setlocale(LC_ALL,"");
  google::ParseCommandLineFlags(&argc, &argv, true);

  srand(static_cast<unsigned int>(std::time(NULL)));
  QFile data("output.txt");
  int lines=FLAGS_lines;
  if (data.open(QFile::WriteOnly | QFile::Truncate)) {
    QTextStream out(&data);
    for(int i=0;i!=lines;++i)
      out << rand()<<"\n";
    out.flush();
  }
  data.close();
  return 0;
}
